package com.madder.myharmonos.controller;

import com.madder.myharmonos.entity.User;
import com.madder.myharmonos.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 2251300220陈成权
 * @since 2025-09-30
 */
@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    IUserService iUserService;

    //http://127.0.0.1:8080/v1/users
    @GetMapping("uers")
    public List<User>userList(){
        System.out.println("UserCOntroller 的userlist方法");
        List<User>list1=iUserService.list();
        return list1;
    }
}
